const panelArr = [
    { name: "战斗顶栏", path: "Canvas/GRoot/Container/MainBattleView/Container/prefabLayer/Container/BattleToolsPanel/topBox" },
    { name: "战斗加速按钮", path: "Canvas/GRoot/Container/MainBattleView/Container/prefabLayer/Container/BattleToolsPanel/SpeedBtn" },
    { name: "技能冷却", path: "Canvas/GRoot/Container/MainBattleView/Container/prefabLayer/Container/skillCDPanel" },
    { name: "主动技能", path: "Canvas/GRoot/Container/MainBattleView/Container/prefabLayer/Container/ActionSkillCtl" },
    { name: "血量信息面板", path: "Canvas/GRoot/Container/MainBattleView/Container/prefabLayer/Container/GameBarPanel/layout" },
    { name: "底部聊天面板", path: "Canvas/GRoot/Container/MainBattleView/Container/prefabLayer/Container/GameChatPanel" }
]

vv.Help.hiddenTargetPanel(panelArr)




//快速过关
const promiseArr = [];
for (let i = 0; i < 2; i++) {
    const promiseCb = () => {
        /**主线*/
        return new Promise((resolve) => {
            vv.NetWorkMgr.Send(vv.NetWorkMgr.Type.gateHandler_start, { type: 1, gate: i + 1 }, (data) => {
                console.log(data);
                setTimeout(() => {
                    const dt = {
                        "id": data.id,
                        "result": 100,
                        "wave": 20,
                        "time": 249,
                        "killnum": [
                            675,
                            0,
                            0
                        ],
                        "kill": [
                            1,
                            2,
                            31
                        ],
                        "options": [],
                        "extras": []
                    };
                    vv.NetWorkMgr.Send(vv.NetWorkMgr.Type.gateHandler_end, dt, (d) => {
                        console.log("结束上报相应", d)
                        resolve(d.code)
                    })
                }, 1000)
            })
        })
    }
    promiseArr.push(promiseCb)
}
const cb = async () => {
    for (let i = 0; i < promiseArr.length; i++) {
        await promiseArr[i]();
    }
}
cb();